﻿/**
* 用户列表Filter Form
* @author luning
* @date 2014/8/7
*/
Ext.define('LNA.view.system.user.FilterForm', {
    extend: 'LNA.view.base.FilterForm',
    alias: 'widget.system_UserList_FilterForm',

    requires: ['LNA.view.field.user.IsEnabledFilter',
               'LNA.view.field.user.IsChangePwdFilter'],

    height: 70,
    layout: 'column',
    defaults: {
        border: false
    },
    initComponent: function () {
        Ext.apply(this, {
            items: [{
                xtype: 'textfield',
                fieldLabel: '登录名',
                name: 'userId',
                emptyText:'user id'
            }, {
                xtype: 'textfield',
                fieldLabel: '姓名',
                name: 'name',
                emptyText: 'user name'
            }, {
                xtype: 'field.isEnabledFilter',
                editable : false
            }, {
                xtype: 'field.isChangePwdFilter',
                editable: false
            }, {
                xtype: 'fieldcontainer',
                fieldLabel: '创建时间',
                width: 400,
                layout: 'hbox',
                defaultType: 'datefield',
                fieldDefaults: {
                    labelAlign: 'right'
                },
                items: [{
                    //xtype: 'datefield',
                    width: 120,
                    name: 'beginDate',
                    format: 'Y-m-d',
                    value: Ext.util.Format.date(Ext.Date.add(new Date(),Ext.Date.DAY, -(new Date().getDate() - 1)))
                },
				{
					xtype: 'displayfield',
					value: '至',
					margin: '0 0 0 5'
				},
				{
					//xtype: 'datefield',
					width: 120,
					name: 'endDate',
					allowBlank: true,
					format: 'Y-m-d',
					value: Ext.util.Format.date(Ext.Date.add(new Date()))
				}]
            }]
        });

        this.callParent(arguments);
    }
});